package com.three.lab.page.message;


import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.three.lab.R;
import com.three.lab.base.BaseActivity;

/**
 * 消息
 * created by lqd on 2024-06-30.
 */
public class MessageListActivity extends BaseActivity {

    private TextView tvTitle,tvCountOrder,tvCountActivity,tvCountService,tvCountInteraction,tvCountOffic;

    @Override
    protected void initParms(Bundle bundle) {}

    @Override
    protected int bindLayout() {
        return R.layout.activity_message_list;
    }

    @Override
    protected void initViews(View view, Bundle savedInstanceState) {
        tvTitle = $(R.id.tv_title);
        tvTitle.setText(R.string.message);

        tvCountOrder = $(R.id.tv_count_order);
        tvCountActivity = $(R.id.tv_count_activity);
        tvCountService = $(R.id.tv_count_service);
        tvCountInteraction = $(R.id.tv_count_interact);
        tvCountOffic = $(R.id.tv_count_office);
    }

    @Override
    protected void setListener() {
        $(R.id.iv_left).setOnClickListener(this);
        $(R.id.ll_order).setOnClickListener(this);
        $(R.id.ll_activity).setOnClickListener(this);
        $(R.id.ll_service).setOnClickListener(this);
        $(R.id.ll_interaction).setOnClickListener(this);
        $(R.id.ll_offic).setOnClickListener(this);
    }

    @Override
    protected void widgetClick(View v) {
        switch (v.getId()){
            case R.id.iv_left:
                finish();
                break;
            case R.id.ll_order:
                startActivity(OrderMsgActivity.class);
                break;
            case R.id.ll_activity:
                startActivity(ActivityMsgActivity.class);
                break;
            case R.id.ll_service:
                startActivity(ServiceMsgActivity.class);
                break;
            case R.id.ll_interaction:
                startActivity(InteractMsgActivity.class);
                break;
            case R.id.ll_offic:
                startActivity(OfficMsgActivity.class);
                break;
        }
    }

    @Override
    protected void initData(Context mContext) {
        tvCountActivity.setText("2");
        tvCountInteraction.setText("8");
        tvCountOffic.setText("19");
        tvCountOrder.setText("37");
        tvCountService.setText("26");
    }
}